﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="consultarAvaliacao.aspx.cs" Inherits="qbaproject.Avaliacao.Consultar.consultarAvaliacao" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" %>
<%@ Register TagPrefix="HTMLEditor" Namespace="AjaxControlToolkit.HTMLEditor" Assembly="AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-wrapper">
		<div id="main-wrapper">
			<div id="main-content">
                <asp:HiddenField ID="hdfIdAvaliacaoRemover" runat="server"></asp:HiddenField>
                <!-- Área de Validação abaixo -->
                <div style="display:none;">
                    <asp:HyperLink ID="linkMsn" runat="server">HyperLink</asp:HyperLink>
                </div>
                <asp:ModalPopupExtender ID="ModalPopupRemover" TargetControlID="linkMsn" runat="server"
                    PopupControlID="PainelMsn" CancelControlID="btnCancelarMsn" BackgroundCssClass="modalBackground">
                </asp:ModalPopupExtender>
                <asp:Panel ID="PainelMsn" runat="server" Style="display: none" Width="350px" CssClass="modalPopup">
                    <asp:Panel ID="PainelCabecalho" runat="server" Style="height: 25px;">
                        <div>
                            <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" style="font-size: 10px">
                                <span class="ui-dialog-title" id="ui-dialog-title-login">
                                    Atenção
                                </span> 
                            </div>
                            <div style="text-align:center">
                                <b><p>Deseja remover essa avaliação?</p></b>
                                <div style="float: right">
				                    <asp:LinkButton ID="lkbSim" CssClass="btn ui-state-default ui-corner-all" runat="server" OnClick="lkbSim_Click" ><span class="ui-icon ui-icon-check"></span>Sim</asp:LinkButton>
			                        <asp:LinkButton ID="lkbNao" CssClass="btn ui-state-default ui-corner-all" runat="server" OnClick="lkbNao_Click" ><span class="ui-icon ui-icon-cancel"></span>Não</asp:LinkButton>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <!-- Final Área de Validação -->
				<div class="title title-spacing">
					<h2>Avaliações</h2>
                    Avaliações
				</div>
               
                <div class="response-msg success ui-corner-all" runat="server" id="divMsnPesquisaSucesso" visible="false">
					<span>Sucesso!</span>
					<asp:Label ID="lblNumEncontrados" runat="server" Text="" />.
				</div>
                <div class="response-msg notice ui-corner-all" runat="server" id="divMsnPesquisaAtencao" visible="false">
					<span>Atenção!</span>
					Não foram encontrados nenhum registro com essas informações.
				</div>
                 <div style="height:30px;">
                    <asp:LinkButton ID="lnk" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" onclick="lnk_Click" ><span class="ui-icon ui-icon-plus"></span>Novo</asp:LinkButton>
                </div>
                <div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					<div class="portlet-header ui-widget-header">Pesquisa</div>
					<div class="portlet-content">
					    <ul>
                             <li>
							            <label  class="desc">
								            Produto
							            </label>
							            <div>
							                <asp:DropDownList ID="ddlProdutos" DataValueField="id_produto" DataTextField="nm_produto" runat="server" CssClass="field">
                                            </asp:DropDownList>
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblProdutoObrigatorio" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
							            <label  class="desc">
								            Usuário
							            </label>
							            <div>
							                <asp:DropDownList ID="ddlUsuarios" DataValueField="id_usuario" DataTextField="nm_usuario" runat="server" CssClass="field">
                                            </asp:DropDownList>
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblUsuarioObrigatorio" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
							            <label  class="desc">
								            Avaliação
							            </label>
							            <div>
                                            <asp:TextBox runat="server" ID="txtTeAvaliacao" CssClass="field text small" Text="" />
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblTeAvaliacaoObrigatorio" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Nota geral
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtNrNotaGeral" CssClass="field text three-column-small" 
                                                Width="20" MaxLength="2" runat="server" Text="" ></asp:TextBox>
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblNrNotaGeralObrigatoria" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Nota de preço
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtNrNotaPreco" CssClass="field text three-column-small" 
                                                Width="20" MaxLength="2" runat="server" Text=""></asp:TextBox>
							            </div>
                                        <div>
                                            
                                            <asp:Label Text="" runat="server" ID="lblNrNotaPrecoObrigatoria" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Nota de qualidade
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtNrNotaQualidade" CssClass="field text three-column-small" 
                                                Width="20" MaxLength="2" runat="server" Text=""></asp:TextBox>
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblNrNotaQualidadeObrigatoria" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Nota de tempo de uso
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtNrNotaTempoUso" CssClass="field text three-column-small" 
                                                Width="20" MaxLength="2" runat="server" Text=""></asp:TextBox>
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblNrNotaTempoUsoObrigatoria" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Pros
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtTePros" TextMode="MultiLine" Rows="5" Columns="40" CssClass="field text small" runat="server" Text=""></asp:TextBox>
							            </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblTeProsObrigatorio" ForeColor="Red" />
                                        </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Contras
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtTeContras" TextMode="MultiLine"  Rows="5" Columns="40"  CssClass="field text small" runat="server" Text=""></asp:TextBox>
                                        </div>
                                        <div>
                                            <asp:Label Text="" runat="server" ID="lblTeContrasObrigatorio" ForeColor="Red" />
                                        </div>
						            </li>
                            <li class="buttons">
                                <div>
				                    <asp:LinkButton ID="lkbPesquisar" CssClass="btn ui-state-default ui-corner-all" 
                                        runat="server" onclick="lkbPesquisar_Click"><span class="ui-icon ui-icon-search"></span>Pesquisar</asp:LinkButton>
			                    </div>
							</li>
                        </ul>
                    </div>
                </div>
				<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					<div class="portlet-header ui-widget-header">Resultado da Pesquisa</div>
					<div class="portlet-content">
                        <div>
                            <asp:GridView ID="grdResAvaliacao" runat="server" AutoGenerateColumns="False" 
                                onrowcommand="grdResAvaliacao_RowCommand" 
                                onpageindexchanging="grdResAvaliacao_PageIndexChanging" BackColor="White" 
                                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                                Width="100%"  ForeColor="Black" GridLines="Vertical" >
                                <Columns>
                                    <asp:BoundField DataField="nm_produto" HeaderText="Produto" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nm_usuario" HeaderText="Usuário" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="te_avaliacao" HeaderText="Avaliação" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nr_nota_geral" HeaderText="Nota Geral" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nr_nota_preco" HeaderText="Nota de preço" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nr_nota_qualidade" HeaderText="Nota de qualidade" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="nr_nota_tempo_uso" HeaderText="Nota de tempo de uso" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="te_pros" HeaderText="Prós" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="te_contras" HeaderText="Contras" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="dt_avaliacao" HeaderText="Data da avaliação" >
                                        <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                    </asp:BoundField>
                                    <asp:TemplateField >
                                        <ItemStyle Width="65px" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1"/>
                                        <ItemTemplate>
                                            <asp:linkbutton ID="Linkbutton1" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Editar" text="" runat="server" CommandName="editar" CommandArgument='<%# Eval("id_avaliacao")%>'><span class="ui-icon ui-icon-wrench"></span></asp:linkbutton>
                                            <asp:linkbutton ID="Linkbutton2" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Remover" text="" runat="server" CommandName="remover" CommandArgument='<%# Eval("id_avaliacao")%>'><span class="ui-icon ui-icon-trash"></span></asp:linkbutton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle CssClass="headerGrid" />
                                <RowStyle  CssClass="trGrid" />
                                <PagerStyle CssClass="trPager" />
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
